<template>
  <div>
    <div class="footer_wrap">
      <!-- 占位符 -->
      <!-- <router-link to="/find">发现音乐</router-link>
    <router-link to="/my">我的音乐</router-link> -->
      <!-- 问号传参 -->
      <!-- /path?参数名=值 -->
      <!-- 动态路径传参 -->
      <!-- path:"/path/:参数名" -->
      <!-- <router-link to="/parte?name=鲤鱼&&age=11">朋友query</router-link>
    <router-link to="/parte/鲤鱼/11">朋友params</router-link> -->
      <span @click="goto('/find', 'Find')">发现音乐</span>
      <span @click="goto('/my', 'my')">我的音乐</span>
      <span @click="goto('/parte?name=鲤鱼&&age=11', 'parte')">朋友</span>
      <span @click="goto('/parte', 'parte')">发现</span>
    </div>
    <div class="top">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "VueRouteApp",

  data() {
    return {};
  },

  mounted() {},

  methods: {
    goto(path, name) {
      this.$router.push({
        // path,
        name,
      });
    },
  },
};
</script>

<style scoped>
.footer_wrap {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  width: 100%;
  text-align: center;
  background-color: #333;
  color: #ccc;
}
.footer_wrap span {
  flex: 1;
  text-decoration: none;
  padding: 20px 0;
  line-height: 20px;
  background-color: #333;
  color: #ccc;
  border: 1px solid black;
}
.footer_wrap span:hover {
  background-color: #555;
}
.top {
  padding-top: 62px;
}
</style>